package com.xwt.pattern.facade;

/**
 * Author:  Steven Xiao
 * Description:
 * Date:  2016/3/14
 * Time:  11:17
 */
public class ModernPostOffice {
    private LetterProcess letterProcess = new LetterProcessImp();
    private Police police = new Police();

    //写信 封闭 投递 一体化了
    public void  sendLetter(String content, String address){
        //帮你写信
        letterProcess.writeContent(content);
        //写好信封
        letterProcess.fillEnvelope(address);
        ////警察要检查信件了
        police.checkLetter(letterProcess);
        //把信放到信封中
        letterProcess.letterIntoEnvelope();
        letterProcess.sendLetter();
    }

}
